package it.fuesi.synoutils.views;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.Checkable;
import android.widget.RelativeLayout;

/**
 * Created by pascotto on 13/11/14.
 */
public class CheckableRealtiveLayout extends RelativeLayout implements Checkable {

    private boolean checked;


    public CheckableRealtiveLayout(Context context){
        super(context);
    }

    public CheckableRealtiveLayout(Context context, AttributeSet attrs){
        super(context, attrs);
    }

    public CheckableRealtiveLayout(Context context, AttributeSet attrs, int defStyle){
        super(context, attrs, defStyle);
    }

    @Override
    public boolean isChecked() {
        return checked;
    }

    @Override
    public void toggle() {
        this.checked = !this.checked;
    }

    @Override
    public void setChecked(boolean checked) {
        this.checked = checked;
    }
}
